package tt.com.feesmanager.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import tt.com.common.enums.Status;
import tt.com.common.enums.TollEnum;
import tt.com.common.model.DeadProject;
import tt.com.common.util.CommonResult;
import tt.com.feesmanager.mapper.DeadprojectMapper;
import tt.com.feesmanager.service.RefundService;

@Service
public class RefundServiceImpl extends ServiceImpl<DeadprojectMapper,DeadProject> implements RefundService {
    @Override
    public CommonResult Refund(DeadProject deadProject) {
        if (deadProject==null){
            return CommonResult.buildR(Status.DEFAULT,"不存在该服务项目，无法进行退费");
        }else {
            TollEnum paymentRefund = TollEnum.PAYMENT_REFUND;
            deadProject.setChargeableStatus(paymentRefund);
            return CommonResult.buildR(Status.OK,"退费成功");
        }
    }
}
